package pta;/**
 * @author： li
 * @date： 2022-03-29 20:55
 * @version 1.0
 */
import java.util.*;
public class 到底有多二 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        char[] a =sc.nextLine().toCharArray();
        int count=0;double degree =1.0;
        int end=a.length-1;int len;
        if(a[0]!='-'){
            len=end+1;
            for (char c : a){
                if (c == '2')
                    count++;
            }
        }else{
            degree=1.5;len=end;
            for(int i=1;i<a.length;i++){
                if (a[i]== '2')
                    count++;
            }
        }

        if(a[end]==0||(a[end]%2==0))
            degree=degree*2.0;
        double ans =(count*degree)/len*100;

        System.out.format("%.2f",ans);
        System.out.print("%");
    }
}
